package br.com.ufpr.sgp.pages;

import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.Model;
import org.wicketstuff.annotation.mount.MountPath;

import br.com.ufpr.sgp.WicketApplication;
import br.com.ufpr.util.base.BasePage;

@MountPath("AcessoNegado")
public class AcessoNegadoPage extends WebPage {
    private static final long serialVersionUID = 7337050233447565262L;

    public AcessoNegadoPage(final String recursoNegado) {
        add(new Label("recursoAcessoNegado", new Model<String>(recursoNegado)));
        final BookmarkablePageLink<?> lnkIndex = new BookmarkablePageLink<BasePage>("lnkIndex", WicketApplication.get().getHomePage());
        add(lnkIndex);
    }

    @Override
    public void renderHead(IHeaderResponse response) {
        super.renderHead(response);
        response.render(JavaScriptHeaderItem.forReference(getApplication().getJavaScriptLibrarySettings().getJQueryReference()));
    }
}